package Gobang;

import java.util.Arrays;

/**
 * @author 张子健
 * @version 1.0
 * Time: 2022-09-25-13:56
 */
public class ChessBroad {
    public final int N = 11;
    public final char[][] chessBoard = new char[N][N];

    //棋盘初始化
    public ChessBroad() {
        for (char[] chars : chessBoard) {
            Arrays.fill(chars, '+');
        }
    }

    //输出棋盘
    public void PrintBoard() {
        for (int i = 0; i < N; i++) {
            if (i == 0) {
                System.out.print("\t");
            }
            System.out.print(i + 1 + "\t");
        }
        System.out.println();

        for (int i = 0; i < chessBoard.length; i++) {
            System.out.print(i + 1 + "\t");
            for (char chars : chessBoard[i]) {
                System.out.print(chars + "\t");
            }
            System.out.println();
        }
    }
}
